From 2774b41693ca8348549a4ee377d7f6355d1ca7ed Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 31 Oct 2005 17:18:32 +0000 Subject: [PATCH] Make 'bool' output the 0/1 in the help instead of the various strings. --- gpsbabel/garmin.c | 2 +- gpsbabel/mapsource.c | 2 +- gpsbabel/ozi.c | 6 +++--- gpsbabel/tpo.c | 2 +- gpsbabel/vecs.c | 7 +++++-- gpsbabel/xcsv.c | 6 +++--- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/gpsbabel/garmin.c b/gpsbabel/garmin.c index a9c50c853..184b37c32 100644 --- a/gpsbabel/garmin.c +++ b/gpsbabel/garmin.c @@ -44,7 +44,7 @@ static arglist_t garmin_args[] = { { "snlen", &snlen, "Length of generated shortnames", NULL, ARGTYPE_INT }, - { "snwhite", &snwhiteopt, "(0/1) Allow whitespace synth. shortnames", + { "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames", NULL, ARGTYPE_BOOL}, { "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING }, { "get_posn", &getposn, "Return current position as a waypoint", diff --git a/gpsbabel/mapsource.c b/gpsbabel/mapsource.c index 88f849502..200efe710 100644 --- a/gpsbabel/mapsource.c +++ b/gpsbabel/mapsource.c @@ -75,7 +75,7 @@ char *mpsuseprox = NULL; static arglist_t mps_args[] = { {"snlen", &snlen, "Length of generated shortnames", NULL, ARGTYPE_INT }, - { "snwhite", &snwhiteopt, "(0/1) Allow whitespace synth. shortnames", + { "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames", NULL, ARGTYPE_BOOL}, {"mpsverout", &mpsverout, "Version of mapsource file to generate (3,4,5)", NULL, diff --git a/gpsbabel/ozi.c b/gpsbabel/ozi.c index 0377f899a..29b7c3eeb 100644 --- a/gpsbabel/ozi.c +++ b/gpsbabel/ozi.c @@ -49,11 +49,11 @@ static arglist_t ozi_args[] = { {"snlen", &snlenopt, "Max synthesized shortname length", NULL, ARGTYPE_INT}, - {"snwhite", &snwhiteopt, "(0/1) Allow whitespace synth. shortnames", + {"snwhite", &snwhiteopt, "Allow whitespace synth. shortnames", NULL, ARGTYPE_BOOL}, - {"snupper", &snupperopt, "(0/1) UPPERCASE synth. shortnames", + {"snupper", &snupperopt, "UPPERCASE synth. shortnames", NULL, ARGTYPE_BOOL}, - {"snunique", &snuniqueopt, "(0/1) Make synth. shortnames unique", + {"snunique", &snuniqueopt, "Make synth. shortnames unique", NULL, ARGTYPE_BOOL}, {0, 0, 0, 0, 0} }; diff --git a/gpsbabel/tpo.c b/gpsbabel/tpo.c index 5866f6d04..8ee9e454e 100644 --- a/gpsbabel/tpo.c +++ b/gpsbabel/tpo.c @@ -32,7 +32,7 @@ static char *output_state = NULL; static arglist_t tpo_args[] = { - { "dumpheader", &dumpheader, "(0/1) Display the file header bytes", + { "dumpheader", &dumpheader, "Display the file header bytes", "0", ARGTYPE_BOOL} , { "state", &output_state, "State map format to write, default=CA", "CA", ARGTYPE_STRING} , diff --git a/gpsbabel/vecs.c b/gpsbabel/vecs.c index e49863554..03b7c5ae7 100644 --- a/gpsbabel/vecs.c +++ b/gpsbabel/vecs.c @@ -742,8 +742,11 @@ disp_vecs(void) printf(VEC_FMT, svp[i]->name, svp[i]->desc); for (ap = svp[i]->vec->args; ap && ap->argstring; ap++) { if ( !(ap->argtype & ARGTYPE_HIDDEN)) - printf(" %-18.18s %-.50s %s\n", - ap->argstring, ap->helpstring, + printf(" %-18.18s %s%-.50s %s\n", + ap->argstring, + (ap->argtype & ARGTYPE_TYPEMASK) == + ARGTYPE_BOOL ? "(0/1) " : "", + ap->helpstring, (ap->argtype & ARGTYPE_REQUIRED)?"(required)":""); } } diff --git a/gpsbabel/xcsv.c b/gpsbabel/xcsv.c index cfcd27d5c..5cff74c76 100644 --- a/gpsbabel/xcsv.c +++ b/gpsbabel/xcsv.c @@ -46,11 +46,11 @@ arglist_t xcsv_args[] = { ARGTYPE_FILE | ARGTYPE_REQUIRED }, {"snlen", &snlenopt, "Max synthesized shortname length", NULL, ARGTYPE_INT}, - {"snwhite", &snwhiteopt, "(0/1) Allow whitespace synth. shortnames", + {"snwhite", &snwhiteopt, "Allow whitespace synth. shortnames", NULL, ARGTYPE_BOOL}, - {"snupper", &snupperopt, "(0/1) UPPERCASE synth. shortnames", + {"snupper", &snupperopt, "UPPERCASE synth. shortnames", NULL, ARGTYPE_BOOL}, - {"snunique", &snuniqueopt, "(0/1) Make synth. shortnames unique", + {"snunique", &snuniqueopt, "Make synth. shortnames unique", NULL, ARGTYPE_BOOL}, {"urlbase", &xcsv_urlbase, "Basename prepended to URL on output", NULL, ARGTYPE_STRING}, -- 2.30.2